<template>
  <!--反馈说明新增  -->
  <div >
    <FormPanel
      ref="formPanel"
      :list="initForm"
      :cols="1"
      :labelWidth="110"
      :isSubmitBtn="false"
      @formChange="formChangeHandle"
    />
    <div class="dialogBottmView">
      <el-button @click="closeDialog">取 消</el-button>
      <el-button @click="saveDialog" type="primary">保 存</el-button>
    </div>
  </div>
</template>

<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  mixins: [dictionary],
  data() {
    return {
      initForm: this.initFormFun(),
      formValue: {}
    };
  },
  methods: {
    //搜索数据
    initFormFun() {
      return [
        {
          type: 'SELECT',
          label: '执行反馈状态',
          fieldName: 'field1',
          placeholder: '请选择',
          initialValue: '',
          itemList: this.createDictList('1008'),
          rules: [
            {
              required: true,
              message: '必填',
              trigger: 'change'
            }
          ]
        },{
          type: 'SELECT',
          label: '周度',
          fieldName: 'field11',
          placeholder: '请选择',
          initialValue: '',
          itemList: this.createDictList('1008'),
          rules: [
            {
              required: true,
              message: '必填',
              trigger: 'change'
            }
          ]
        },
        {
          type: 'DATE',
          label: '反馈时间',
          fieldName: 'field2',
          valueFormat: 'yyyy-MM-dd', //返回数据格式
          initialValue: '',
          placeholder: '请选择',
          style: { width: '100%' },
          rules: [
            {
              required: true,
              message: '必填',
              trigger: 'change'
            }
          ]
        },{
          type: 'TEXT_AREA',
          label: '进度说明',
          fieldName: 'field3',
          rows:3,
          maxlength:100,
          initialValue: '',
          placeholder:'请输入',
          rules: [
            {
              required: true,
              message: '必填',
              trigger: 'blur'
            }
          ]
        },{
          type: 'TEXT_AREA',
          label: '整改项目',
          fieldName: 'field4',
          rows:3,
          maxlength:100,
          initialValue: '',
          placeholder:'请输入'
        }
      ];
    },
    formChangeHandle(val) {
      this.formValue = val;
    },
    //保存
    saveDialog() {
      this.$emit('close', { visible: false });
    },
    //取消操作
    closeDialog() {
      this.$emit('close', { visible: false });
    }
  }
};
</script>